1. Field of the Invention
The present invention relates to an image-forming device and particularly relates to a technology suitable for printing contents distributed via data communications including digital-data broadcast, the Internet, and so forth.
2. Description of the Related Art
Hitherto, there have been proposed printers that can reduce the size of an output image of the contents of an HTML file, change or rotate the orientation of the output image, and ignore a line-feed prohibition instruction and/or lateral-width specification, where the lateral width of the output image is larger than the size of a recording medium.
In the case of the above-described printer, where page-break part of the output image includes characters written into the HTML file, a line including the above-described characters is inserted into image information that is generated, as the layout of a succeeding page.
In an element tree obtained by analyzing the HTML file, interference often arises between an element block that had already been arranged and an element block that is to be printed, relating to the arrangement of the element block that is to be printed. For example, in the case where page-break processing is performed, it becomes necessary to recursively refer to the element block that had already been arranged for rearranging previous elements.
In the past, it was necessary to follow the element tree every time the necessity for referring to the arranged block arises. That is to say, it was necessary to trace the element tree back to the upper part thereof, trace the element tree down to the lower part thereof, and trace links, so as to obtain the pointer of a desired element block.
In recent years, digital TVs and mobile gear including a mobile phone, a digital camera, and so forth have increasingly used contents written in markup languages. However, since the above-described equipment and devices have limited resources, it has been desired that processing load on the equipment and devices be reduced as much as possible. For example, layout processing for converting the contents into print data is heavy-load processing, since the layout processing requires very large memory resources for holding element blocks.
Further, in the case where a display image of the contents of an HTML document is produced on a display unit or the like and where the contents extend beyond a displayable area, a scroll bar is provided, so as to allow an operator to move the contents in the displayable area. As for printing, a page-assignment method has been demanded for the contents of the HTML document, so as to give a visual feeling of neither physical disorder nor disturbance to an observer. The physical disorder and the disturbance often arise due to the limited size of a recording medium.